<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets">
    <body>
         <h:panelGrid columns="2">
		<h:panelGroup>
		    <h:graphicImage width="100" url="#{StudentBean.target.profilePicture}"/>
		    <h:panelGroup>
		    <h:outputLabel value="Durum: "/>
		    <p:inplace>
			  <p:inputText disabled="#{StudentBean.same()==false}" value="#{StudentBean.target.status}" />
		    </p:inplace>
		    <p:commandButton rendered="#{StudentBean.same()}" ajax="false" action="#{StudentBean.changeStatus()}" value="Durum değiştir"/>
		    </h:panelGroup>
		    
			  <p:commandButton value="Ders Programını Gör" onclick="program.show();"/>
		    <h:panelGrid columns="2">
			  <h:outputLabel value="Ad:"/>
			  <h:outputLabel value="#{StudentBean.target.firstName}"/>
			  <h:outputLabel value="Soyad:"/>
			  <h:outputLabel value="#{StudentBean.target.lastName}"/>
			  <h:outputLabel value="E-Posta:"/>
			  <h:outputLabel value="#{StudentBean.target.email}"/>
			  <h:outputLabel value="Danışman:"/>
			  <p:commandLink value="#{StudentBean.target.mentor.fullName}" action="#{HomePageBean.clickTeacher()}" ajax="false">
				<f:setPropertyActionListener value="#{StudentBean.target.mentor}" target="#{TeacherBean.target}"/>
			  </p:commandLink>
			  <h:outputLabel value="Aldığı Dersler: "/>
                                                                    <p:dataList var="course" value="#{StudentBean.courses}">
				<p:column>
				<p:commandLink value="#{course.NAME}" action="#{HomePageBean.clickCourse()}" ajax="false">
				    <f:setPropertyActionListener value="#{course}" target="#{CourseBean.target}"/>
				</p:commandLink>
				</p:column>
			  </p:dataList>
		    </h:panelGrid>
		</h:panelGroup>
		
	  </h:panelGrid>
    </body>
</html>
